/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ecom.login;

import util.Util;
import com.opensymphony.xwork2.ActionSupport;
import java.util.Map;
import org.apache.struts2.interceptor.SessionAware;

/**
 *
 * @author Miko
 */
public class LogoutAction extends ActionSupport implements SessionAware{

    private Map<String, Object> session;

    @Override
    public void setSession(Map<String, Object> session) {
        this.session = session;
    }

    @Override
    public String execute() {
// suppression de l'attribut de session
        this.session.remove(Util.LOGINATTRIBUTE);
        return LOGIN;
    }   
}
